import Vue from 'vue'
import Router from 'vue-router'

import Me from '../views/Me'
import Cinema from '../views/Cinema'
import Home from '../views/Home'
import NotFound from '../components/404'
import MovieDetail from '../views/MovieDetail'
import CinemaDetail from '../views/CinemaDetail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/me',
      component: Me
    },
    {
      path: '/cinema',
      component: Cinema
    },
    {
      path: '/movie/detail/:id',
      name: 'detail',
      component: MovieDetail,
      props:true
    },
    {
      path: '/cinema/detail/:id',
      name: 'cdetail',
      component: CinemaDetail
    },
    {
      path: '/no',
      component: () => import('../views/No')
    },
    {
      path: '*',
      component: NotFound
    }
  ]
})
